// 获取当前时间是早上，中午，还是下午
export const getTime = () => {
  let message = '';
  let hours = new Date().getHours();
  if (hours <= 9 && hours >= 7) {
    message = '早上好';
  } else if (hours <= 12 && hours > 9) {
    message = '上午好';
  } else if (hours <= 14 && hours > 12) {
    message = '中午好';
  } else if (hours <= 18 && hours > 14) {
    message = '下午好';
  } else {
    message = '晚上好';
  }
  return message;
};
